package com.thinkgem.jeesite.common.beetl;

import com.thinkgem.jeesite.common.config.Global;
import org.beetl.core.GroupTemplate;
import org.beetl.core.Template;
import org.beetl.ext.web.WebRenderExt;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class GlobalExt implements WebRenderExt {
    static long version = System.currentTimeMillis();
    @Override
    public void modify(Template template, GroupTemplate arg1, HttpServletRequest request, HttpServletResponse response) {
        //js,css 的版本编号
        template.binding("ctx",request.getContextPath()+ Global.getAdminPath());
        template.binding("ctxStatic",request.getContextPath()+ "/static");
    }
}